package org.mall.modules.pojo.product.dto;

import lombok.Data;
import org.mall.common.aspect.annotation.Dict;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class ProductMsgDTO implements Serializable {

    /**状态(1上架，2下架，3删除)*/
    @Dict(dicCode = "audit_status")
    private String auditStatus;
    /**品牌ID*/
    private String brandId;
    /**副标题*/
    @Size(min = 2,max = 100,message = "副标题大小(2-100)")
    private String caption;
    /**SPU名称*/
    @Size(min = 2,max = 100,message = "SPU名称大小(2-100)")
    private String name;
    /**SPU主键*/
    private Long id;
    /**是否删除*/
    private String isDelete;
    /**是否上架*/
    private String isMarketable;
    /**商家ID*/
    private String sellerId;
    /**小图*/
    private String picUrls;

    /**审核（0：待审核。1审核通过）*/
    @Dict(dicCode = "to_examine")
    private String toExamine;
    /**品牌*/
    @NotNull(message = "品牌名称不能为空")
    @Size(min = 2,max = 100,message = "品牌名称大小不合法()")
    private String brand;
    /**所属类目名*/
    private String category;
    /**所属类目ID，子类目*/
    private String categoryId;
    /**SPU_id */
    private String spuId;
    /**商品图片 */
    private String picUrl;
    /**市场价*/
    @DecimalMin(value = "0",message = "市场价格不能小于0")
    private Integer marketPrice;
    /**库存数量*/
    @Size(message = "库存数量不能小于0 ")
    private Integer quantity;
    /**商品价格，单位：元*/
    @DecimalMin(value = "0",message = "商品价格不能小于0")
    private Integer price;
    /**商品卖点*/
    @Size(min = 2,max = 500,message = "商品卖点(2-500)")
    private String sellPoint;
    /**店铺_id*/
    private String shopId;
    /**规格*/
    @Size(min = 2,max = 200,message = "规格字数大小(2-200) attrs")
    private String attrs;
    /**状态，1上架，2下架，3删除*/
    private String status;
    /**商品标题*/
    @NotNull(message = "商品标题不能为空")
    @Size(min = 2,max = 100,message = "商品标题大小不合法(2-100)")
    private String title;
    /**SKU_id*/
    private Long skuId;
}
